package com.dolphin.servicemap.controller;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dolphin.common.dto.DicDistrict;
import com.dolphin.servicemap.mapper.DicDistrictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestController {
    @Autowired
    DicDistrictMapper dicDistrictMapper;
    @GetMapping("/test")
    public String test() {
        return "test";
    }

    @GetMapping("/test-map")
    public Object testMap() {

        QueryWrapper<DicDistrict> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("address_code","11000");
        List<DicDistrict> dicDistricts = dicDistrictMapper.selectList(queryWrapper);
        return dicDistricts;
    }

}
